Conversation
|
Thanks @rpkilby! (Build still failing though... 😐) I didn't have time to dig into this. It was fine. What changed? |
|
virtualenv/venv was not the cause, that was just correlated to how I was calling tox. The actual issue appears to be a change in tox 3. bisected to tox-dev/tox#935 |
|
Note that the first call to tox raises an exception, while the second call succeeds. e.g., what I saw when changing from virtualenv to venv. |
So is the temporary fix to pin the tox version? |
|
More info in tox-dev/tox#935 (comment) and pypa/pip#4621 (comment). Basically, this should be fixable by mucking with pkg_resources. That said, the better fix is to move |
|
Right, good digging! 👏
Thanks for the effort! 🏆 |
|
It should be possible to do this without any significant reorganization - just some config changes and moving Note to self, will need to |
Codecov Report
@@ Coverage Diff @@
## master #6139 +/- ##
=======================================
Coverage 96.18% 96.18%
=======================================
Files 128 128
Lines 17624 17624
Branches 1459 1459
=======================================
Hits 16951 16951
Misses 465 465
Partials 208 208 |
tox now invokes pip as a python module instead of through its entry point. "python -m" adds the current directory to the PYTHONPATH, picking up the .egg-info/ metadata directory, tricking pip into thinking that the package is already installed (and thus not installing the wheel). Deleting the metadata directory fixes this.
|
I was wrong. Running the test suite from |
ref: encode/django-rest-framework#6139 tox now invokes pip as a python module instead of through its entry point. "python -m" adds the current directory to the PYTHONPATH, picking up the .egg-info/ metadata directory, tricking pip into thinking that the package is already installed (and thus not installing the wheel). Deleting the metadata directory fixes this.
ref: encode/django-rest-framework#6139 tox now invokes pip as a python module instead of through its entry point. "python -m" adds the current directory to the PYTHONPATH, picking up the .egg-info/ metadata directory, tricking pip into thinking that the package is already installed (and thus not installing the wheel). Deleting the metadata directory fixes this.
This was added in encode#6139. However it seems [tox-venv is no longer maintained](https://github.com/tox-dev/tox-venv), the related [virtualenv issue has been closed](pypa/virtualenv#355), and I suspect with the virtualenv rewrite fixed the problem with site.py and the warnings referred to for the DRF tests.
This was added in #6139. However it seems [tox-venv is no longer maintained](https://github.com/tox-dev/tox-venv), the related [virtualenv issue has been closed](pypa/virtualenv#355), and I suspect with the virtualenv rewrite fixed the problem with site.py and the warnings referred to for the DRF tests.
* Use tox-venv to reduce warnings in output * Remove .egg-info/ to allow wheel installation tox now invokes pip as a python module instead of through its entry point. "python -m" adds the current directory to the PYTHONPATH, picking up the .egg-info/ metadata directory, tricking pip into thinking that the package is already installed (and thus not installing the wheel). Deleting the metadata directory fixes this.
This was added in encode#6139. However it seems [tox-venv is no longer maintained](https://github.com/tox-dev/tox-venv), the related [virtualenv issue has been closed](pypa/virtualenv#355), and I suspect with the virtualenv rewrite fixed the problem with site.py and the warnings referred to for the DRF tests.
There is some incompatibility with tox/pytest/virtualenv that causes the 'dist' build to fail. By using the builtin venvs, the issue is bypassed.I'm also too lazy to figure out why exactly this is happening.